package com.hxtec.polaris.model;

import javax.persistence.*;

/**
 * @Author Marcus lv
 * @create 2019/11/28 5:54 下午
 */
@Entity
@Table(name = "shop_cart_detail", schema = "hx_tec_shop", catalog = "")
public class ShopCartDetailEntity {
    private String id;
    private String cartId;
    private String sku;
    private Integer number;
    private String comment1;
    private String comment2;
    private String comment3;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "cart_id")
    public String getCartId() {
        return cartId;
    }

    public void setCartId(String cartId) {
        this.cartId = cartId;
    }

    @Basic
    @Column(name = "sku")
    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    @Basic
    @Column(name = "number")
    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Basic
    @Column(name = "comment1")
    public String getComment1() {
        return comment1;
    }

    public void setComment1(String comment1) {
        this.comment1 = comment1;
    }

    @Basic
    @Column(name = "comment2")
    public String getComment2() {
        return comment2;
    }

    public void setComment2(String comment2) {
        this.comment2 = comment2;
    }

    @Basic
    @Column(name = "comment3")
    public String getComment3() {
        return comment3;
    }

    public void setComment3(String comment3) {
        this.comment3 = comment3;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ShopCartDetailEntity that = (ShopCartDetailEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (cartId != null ? !cartId.equals(that.cartId) : that.cartId != null) return false;
        if (sku != null ? !sku.equals(that.sku) : that.sku != null) return false;
        if (number != null ? !number.equals(that.number) : that.number != null) return false;
        if (comment1 != null ? !comment1.equals(that.comment1) : that.comment1 != null) return false;
        if (comment2 != null ? !comment2.equals(that.comment2) : that.comment2 != null) return false;
        if (comment3 != null ? !comment3.equals(that.comment3) : that.comment3 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (cartId != null ? cartId.hashCode() : 0);
        result = 31 * result + (sku != null ? sku.hashCode() : 0);
        result = 31 * result + (number != null ? number.hashCode() : 0);
        result = 31 * result + (comment1 != null ? comment1.hashCode() : 0);
        result = 31 * result + (comment2 != null ? comment2.hashCode() : 0);
        result = 31 * result + (comment3 != null ? comment3.hashCode() : 0);
        return result;
    }
}
